package com.cjkj.equipment.mapper;

import com.cjkj.equipment.domain.TJ03DataEcg;
import com.cjkj.system.api.domain.APITJ03EcgData;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * TJ03设备心电数据Mapper接口
 * 
 * @author cjkj
 * @date 2025-05-27
 */
public interface TJ03DataEcgMapper
{
    /**
     * 查询TJ03设备使用期间最新一条心电数据
     * @return TJ03设备心电数据
     */
    TJ03DataEcg selectLastEcgDataByEquipment(@Param("equipmentNo")String equipmentNo,
                                                                  @Param("startTime") Long startTime);
    /**
     * 查询TJ03设备心电数据
     * @return TJ03设备心电数据
     */
    List<TJ03DataEcg> selectEcgDataByEquipment(@Param("equipmentNo")String equipmentNo,
                                                                  @Param("startUseTime")Long startUseTime,
                                                                  @Param("lastDataTime")Long lastDataMillisecond,
                                                                  @Param("tenMinutesAgo")Long tenMinutesAgo);
    /**
     * 查询TJ03设备心电数据
     * @return TJ03设备心电数据
     */
    List<APITJ03EcgData> ecgDataList(@Param("equipmentNo") String equipmentNo,
                                         @Param("startTime") Long startTime,
                                         @Param("endTime") Long endTime);
    /**
     * 新增TJ03设备心电数据
     * @param equipmentTj03MonitorRecordsEcg TJ03设备心电数据
     * @return 结果
     */
    int insertEquipmentTj03MonitorRecordsEcg(TJ03DataEcg equipmentTj03MonitorRecordsEcg);

}
